1. Field of the Invention
The present invention generally relates to an optical disk device which records and reproduces information to/from a writable optical disk, and more particularly, to a technology for preventing the occurrence of a buffer-underrun during a data-recording.
2. Description of the Related Art
A writable optical disk has a relatively large unit into which to write data due to characteristics of a recording format. Many of conventional optical disk devices do not cause a data-recording to an optical disk to pause. Therefore, unless data is transmitted from a host computer to the optical disk device at a higher transfer rate than a recording speed of the optical disk device to the optical disk, the data-recording comes to be suspended. When the data-recording to the optical disk is suspended, the data-recording fails because the data cannot be written additionally.
This is called a buffer-underrun. As the recording speed to the optical disk becomes higher, the buffer-underrun is more likely to occur, and the resulting failure of the data-recording poses a serious problem for a user, because a CD-R is a write once type, in which a failure of a data-recording means a loss of an optical disk and a loss of the data already written or to be written.
A method has been contrived for preventing such a buffer-underrun: increasing a capacity of a buffer RAM provided in an optical disk device for temporarily storing data from a host computer so as to absorb the change in a data transfer speed from the host computer during a data-recording. However, increasing the capacity of the buffer RAM is not a good measure, because increasing the capacity of the buffer RAM leads to raising a cost of the optical disk device as a whole. Additionally, the buffer RAM cannot deal with all cases related to the differences in a throughput of host computers.
Another method contrived is detecting in advance that a buffer-underrun is near to occur so as to change the data-recording speed to an optical disk. However, this method involves a complicated structure and control, because the data-recording speed needs to be switched during a data-recording to the optical disk.
Thereupon, Japanese Laid-Open Patent Application No. 10-49990 discloses an invention which can prevent a buffer-underrun beforehand regardless of a change in a data transfer speed from a host computer by comprising a means for temporarily stopping a data-recording during the data-recording to an optical disk, and a means for resuming the data-recording from a position at which the data-recording is stopped.
In other words, the Japanese Laid-Open Patent Application No. 10-49990 describes that, when a data-transfer from a host computer cannot keep up with a data-recording to an optical disk, the data-recording operation is temporarily stopped until the data-recording is resumed when a sufficient amount of data to perform a data-recording to the optical disk is secured after the data-transfer is resumed. In this arrangement, a displacement in the joint of the two recordings is made extremely small in terms of positional precision so that the data maintains a continuity by a CIRC demodulation, and an area including the joint can be reproduced without causing a serious problem in terms of data-reproduction. Further, as to a means for forming the above-mentioned precise joint, the invention disclosed in the Japanese Laid-Open Patent Application No. 10-49990 is characterized by comprising a means for accurately detecting an end of data recorded last time when resuming a data-recording, and a means for resuming the data-recording from the end of the data.
Such a recording control as disclosed in the Japanese Laid-Open Patent Application No. 10-49990 involves a possibility that a data-recording operation to an optical disk is frequently stopped and resumed. Normally, data transferred from a host computer is temporarily stored in a buffer RAM, and a predetermined parity, etc. is encoded and added to the data. Thereafter, the data is subjected to processes including an EFM modulation so as to be recorded as recorded data on an optical disk. Currently, in a conventional optical disk device, the capacity of the buffer RAM is approximately from 512 kilobytes (Kbytes) to 2 megabytes (Mbytes).
On the other hand, a recording speed to a CD, for example, is 150 Kbytes at a normal speed, and if a recording speed keeps being increased as it currently is, the recording speed becomes 2.4 Mbytes/sec at a sixteen-fold speed. Therefore, all the data temporarily stored in the buffer RAM is to be recorded on the optical disk in as short a time as approximately 0.8 seconds. Accordingly, unless new data is transmitted from the host computer in this short time and then a predetermined parity, etc. is encoded and added to the data, a buffer-underrun occurs in which the recording operation is temporarily stopped. Even though the capability of a host computer connected to an optical disk device is being improved, a possibility that a data-recording operation is frequently stopped and resumed has to be treated properly in order to guarantee a stable operation in association with any host computer.
However, when performing the above-mentioned control of detecting an ending position of the previous recording and accurately resuming the data-recording from the ending position, under the situation where a data-recording operation is frequently stopped and resumed, a displacement may occur between absolute time information (ATIP absolute time information) and a position of recorded data, and when the displacement actually occurs, the displacement is accumulated. When the accumulated displacement surpasses a certain value, the data-recording operation cannot be resumed. As mentioned above, the amount of data that is transferred from a host computer and can be retained in an optical disk device is equivalent to the capacity of a buffer RAM at most. Therefore, unless another data is transferred from the host computer within a period by the end of recording the data stored in the buffer RAM, the recording operation has to be temporarily stopped.
Further, if a change in revolution of a motor occurs during this period, and if the change cannot be absorbed in a motor revolution control, the ending position of the recording is displaced from the absolute position on the optical disk. Thereafter, upon resuming the recording, the displaced ending position of the previous recording is detected, and the data-recording is resumed from the displaced ending position. Accordingly, the displacement from the absolute position on the optical disk is accumulated. In a control of a recording position for resuming a data-recording as an example, a frame address of the aimed position is first detected by using ATIP absolute time information. Next, the ending position is predicted by switching from information obtained by reproducing data recorded on an optical disk to a sub-code frame synchronizing-signal.
In this control of determining a position for resuming a data-recording, when the above-mentioned accumulation of displacement surpasses one sub-code frame, the data-recording may be erroneously resumed from a position before the ending position of the previous recording. That is, an overlap occurs in the above-mentioned joint of the two recordings in some case, and, in other case, recorded information is reproduced while the recorded information keeps the displacement from the absolute position information on the optical disk. In both cases, there is a possibility that data may not be reproduced accurately. The seriousness of this problem depends on the number of times a data-recording operation is temporarily stopped and resumed which affects the accumulation of displacement, and also depends on a length of a period from a resumption of the data-recording operation until a stop thereof which affects the time to be taken for a motor revolution control to transit from an unstable state to a stable state. In other words, the above-mentioned possibility becomes greater as the capacity of the buffer RAM becomes smaller, and as the recording speed to the optical disk becomes higher.